package com.zzxy.controller;

import com.zzxy.entity.Newsype;
import com.zzxy.service.NewsypeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (Newsype)表控制层
 *
 * @author makejava
 * @since 2023-11-28 10:51:25
 */
@RestController
@RequestMapping("newsype")
public class NewsypeController {
    /**
     * 服务对象
     */
    @Resource
    private NewsypeService newsypeService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public Newsype selectOne(Integer id) {
        return this.newsypeService.queryById(id);
    }

}